/*   1:    */ package com.atomikos.icatch.imp;
/*   2:    */ 
/*   3:    */ import com.atomikos.icatch.HeurCommitException;
/*   4:    */ import com.atomikos.icatch.HeurHazardException;
/*   5:    */ import com.atomikos.icatch.HeurMixedException;
/*   6:    */ import com.atomikos.icatch.HeurRollbackException;
/*   7:    */ import com.atomikos.icatch.HeuristicMessage;
/*   8:    */ import com.atomikos.icatch.Participant;
/*   9:    */ import com.atomikos.icatch.RollbackException;
/*  10:    */ import com.atomikos.icatch.StringHeuristicMessage;
/*  11:    */ import com.atomikos.icatch.SysException;
/*  12:    */ import java.util.Dictionary;
/*  13:    */ 
/*  14:    */ public class RollbackOnlyParticipant
/*  15:    */   implements Participant
/*  16:    */ {
/*  17:    */   private StringHeuristicMessage msg_;
/*  18:    */   
/*  19:    */   public RollbackOnlyParticipant(StringHeuristicMessage msg)
/*  20:    */   {
/*  21: 53 */     this.msg_ = msg;
/*  22:    */   }
/*  23:    */   
/*  24:    */   public boolean recover()
/*  25:    */     throws SysException
/*  26:    */   {
/*  27: 63 */     return true;
/*  28:    */   }
/*  29:    */   
/*  30:    */   public void setCascadeList(Dictionary allParticipants)
/*  31:    */     throws SysException
/*  32:    */   {}
/*  33:    */   
/*  34:    */   public void setGlobalSiblingCount(int count) {}
/*  35:    */   
/*  36:    */   public int prepare()
/*  37:    */     throws RollbackException, HeurHazardException, HeurMixedException, SysException
/*  38:    */   {
/*  39: 93 */     throw new RollbackException(this.msg_.toString());
/*  40:    */   }
/*  41:    */   
/*  42:    */   public HeuristicMessage[] commit(boolean onePhase)
/*  43:    */     throws HeurRollbackException, HeurHazardException, HeurMixedException, RollbackException, SysException
/*  44:    */   {
/*  45:106 */     throw new RollbackException(this.msg_.toString());
/*  46:    */   }
/*  47:    */   
/*  48:    */   public HeuristicMessage[] rollback()
/*  49:    */     throws HeurCommitException, HeurMixedException, HeurHazardException, SysException
/*  50:    */   {
/*  51:116 */     return getHeuristicMessages();
/*  52:    */   }
/*  53:    */   
/*  54:    */   public void forget() {}
/*  55:    */   
/*  56:    */   public HeuristicMessage[] getHeuristicMessages()
/*  57:    */   {
/*  58:134 */     HeuristicMessage[] ret = new HeuristicMessage[1];
/*  59:135 */     ret[0] = this.msg_;
/*  60:136 */     return ret;
/*  61:    */   }
/*  62:    */   
/*  63:    */   public String getURI()
/*  64:    */   {
/*  65:145 */     return null;
/*  66:    */   }
/*  67:    */ }


/* Location:           C:\myfile\mysoft\apache-maven-3.5.0-bin\apache-maven-3.5.0\myrep\com\atomikos\transactions\3.7.0\transactions-3.7.0.jar
 * Qualified Name:     com.atomikos.icatch.imp.RollbackOnlyParticipant
 * JD-Core Version:    0.7.0.1
 */